<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Unit Test: Extend Method</title>
    <script type="text/javascript" src="../../scripts/dd/dd.js"></script>
    <!--<script type="text/javascript" src="http://ddframework.googlecode.com/svn/trunk/scripts/dd/dd.js"></script>-->
    <script type="text/javascript">
    dd({
        debug: true,
        modules: [
            "template"
        ]
    });
    // Unit Tests
    dd(function(){
        dd.log("Add Clickable Link");
        var testClick = dd(dd.body).addElement("button");
        dd(testClick).template("Count {0}", 0);
        dd.log("Attach Event:");
        var foo = "bar";
        dd(testClick).event({
            click: function()
            {
                dd.log(this.self.event.click[0].toString(), dd.log.responseSuccess);
                dd(this).template(0, dd(this).template(0) + 1);
                dd.log("Passed in: " + this.foo);
            }
        }, { foo: foo });
        dd.log("Results of Click:");
    });
    </script>
</head>
<body>
    <p>Loading...</p>
</body>
</html>